From: Andreas Beckmann Date: Wed, 27 Jan 2021 20:26:51 +0000 (+0100) Subject: [PATCH] restore setting unroll-threshold on LLVM 9 X-Git-Tag: archive/raspbian/1.6-4+rpi1^2~3 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a3ebd123462e56e5a476e338052a0b723dc5fa39;p=pocl.git [PATCH] restore setting unroll-threshold on LLVM 9 otherwise kernel/test_rotate hangs on avx512 capable cpus (this partially reverts 459d0bb5241a62af3b5b607a65dcf5e9a34a01ee) Gbp-Pq: Name 0003-restore-setting-unroll-threshold-on-LLVM-9.patch --- diff --git a/lib/CL/pocl_llvm_utils.cc b/lib/CL/pocl_llvm_utils.cc index aa0d33d..7ff6645 100644 --- a/lib/CL/pocl_llvm_utils.cc +++ b/lib/CL/pocl_llvm_utils.cc @@ -347,6 +347,12 @@ void InitializeLLVM() { O->addOccurrence(1, StringRef("debug"), StringRef("true"), false); } +#if LLVM_MAJOR == 9 + O = opts["unroll-threshold"]; + assert(O && "could not find LLVM option 'unroll-threshold'"); + O->addOccurrence(1, StringRef("unroll-threshold"), StringRef("1"), false); +#endif + LLVMInitialized = true; }